<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/modules/job/schedule-add-or-update.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\..\index.html">All files</a> / <a href="index.html">src/views/modules/job</a> schedule-add-or-update.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/49</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/32</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/19</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/33</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;<span class="cstat-no" title="statement not covered" >t<span class="fstat-no" title="function not covered" >em</span>plate&gt;</span>
  &lt;el-dialog
    :title="!dataForm.id ? '新增' : '修改'"
<span class="cstat-no" title="statement not covered" >    :close-on-click-modal="false"</span>
    :visible.sync="visible"&gt;
    &lt;el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px"&gt;
      &lt;el-form-item label="bean名称" prop="beanName"&gt;
        &lt;el-input v-model="dataForm.beanName" placeholder="spring bean名称, 如: testTask"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item label="方法名称" prop="methodName"&gt;
        &lt;el-input v-model="dataForm.methodName" placeholder="方法名称"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item label="参数" prop="params"&gt;
        &lt;el-input v-model="dataForm.params" placeholder="参数"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item label="cron表达式" prop="cronExpression"&gt;
        &lt;el-input v-model="dataForm.cronExpression" placeholder="如: 0 0 12 * * ?"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
      &lt;el-form-item label="备注" prop="remark"&gt;
        &lt;el-input v-model="dataForm.remark" placeholder="备注"&gt;&lt;/el-input&gt;
      &lt;/el-form-item&gt;
    &lt;/el-form&gt;
    &lt;span slot="footer" class="dialog-footer"&gt;
      &lt;el-button @click="visible = false"&gt;取消&lt;/el-button&gt;
      &lt;el-button type="primary" @click="dataFormSubmit()"&gt;确定&lt;/el-button&gt;
    &lt;/span&gt;
  &lt;/el-dialog&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  export default {
    data () {
      return {
        visible: false,
        dataForm: {
          id: 0,
<span class="cstat-no" title="statement not covered" >          beanName: '',</span>
          methodN<span class="fstat-no" title="function not covered" >ame: </span>'',
<span class="cstat-no" title="statement not covered" >          params: '',</span>
          cronExpression: '',
          remark: '',
          status: 0
        },
        dataRule: {
          beanName: [
            { required: true, message: '用户名不能为空', trigger: 'blur' }
          ],
          methodName: [
            { required: true, message: '方法名称不能为空', trigger: 'blur' }
          ],
          cronExpression: [
            { required: true, message: 'cron表达式不能为空', trigger: 'blur' }
          ]
        }
      }
    },
    methods: {
      init (id) {
        this.dataFo<span class="fstat-no" title="function not covered" >rm.id</span> = id || 0
        this.visib<span class="cstat-no" title="statement not covered" >le = </span>true
        this.$nextTick(() =&gt; {
<span class="cstat-no" title="statement not covered" >          this.$refs['dataForm'].r</span>esetFields()
<span class="cstat-no" title="statement not covered" >          if (this.dataForm</span>.id) {
<span class="cstat-no" title="statement not covered" >            this.$htt<span class="fstat-no" title="function not covered" >p(</span>{</span>
<span class="cstat-no" title="statement not covered" >              url: this.$http.adornUrl(`/sys/sc</span>hedule/info/${this.dataForm.id}`),
<span class="cstat-no" title="statement not covered" >              method: 'get',</span>
<span class="cstat-no" title="statement not covered" >              params: this.$http.adornParams()</span>
            }).then(({data}) =&gt; {
              if (data &amp;&amp; data.code === 0) {
                this.dataForm.beanName = data.schedule.beanName
                th<span class="fstat-no" title="function not covered" >is</span>.dataForm.methodName = data.schedule.methodName
                this.da<span class="cstat-no" title="statement not covered" >taForm.par</span>ams = data.schedule.params
                this.dataForm.cronExpression = data.schedule.cronExpression
<span class="cstat-no" title="statement not covered" >                this.dataForm.remark = data.schedule.remark</span>
<span class="cstat-no" title="statement not covered" >                this.dataForm.status = data.schedule.status</span>
<span class="cstat-no" title="statement not covered" >              }</span>
            })<span class="cstat-no" title="statement not covered" ></span>
          }<span class="cstat-no" title="statement not covered" ></span>
        })<span class="cstat-no" title="statement not covered" ></span>
      },<span class="cstat-no" title="statement not covered" ></span>
      // 表单提交
      dataFormSubmit () {
        this.$refs['dataForm'].validate((valid) =&gt; {
          if (valid) {
            this.$http({
              url: this.$http.adornUrl(`/sys/schedule/${!this.dataForm.id ? 'save' : 'update'}`),
              method: 'post',
              data: this.$htt<span class="fstat-no" title="function not covered" >p.adornData({</span>
                'jo<span class="cstat-no" title="statement not covered" >bId':</span> this.dataForm.id || undefined,
                'beanName': this.dataForm.beanName,
<span class="cstat-no" title="statement not covered" >                'methodName': this.dat<span class="fstat-no" title="function not covered" >aF</span>orm.methodName,</span>
<span class="cstat-no" title="statement not covered" >                'params': this.dataForm.params,</span>
<span class="cstat-no" title="statement not covered" >                'cronExpression': this.dataForm.cronExpression,</span>
                'remark': this.dataForm.remark,
                'status': !this.dataForm.id ? undefined : this.dataForm.status
              })
            }).then(({data}) =&gt; {
              if (data &amp;&amp; data.code === 0) {
                this.$message({
                  message: '操作成功',
                  type: 'success',
                  duration: 1500,
                  onClose: () =&gt; {
                    this.visible = false
<span class="fstat-no" title="function not covered" ></span>                    this.$emit('refreshDataList')
                  }<span class="cstat-no" title="statement not covered" ></span>
                })
<span class="cstat-no" title="statement not covered" >              } else {</span>
<span class="cstat-no" title="statement not covered" >                this.$message.error(data.msg)</span>
              }
            })
          }
        })<span class="fstat-no" title="function not covered" ></span>
      }<span class="cstat-no" title="statement not covered" ></span>
    }<span class="cstat-no" title="statement not covered" ></span>
  }
&lt;/script&gt;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Sep 20 2018 10:14:21 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\..\sorter.js"></script>
</body>
</html>
